Skip to main content

child

Table Name: child

The child table stores detailed information about children enrolled in a system, including personal details, parental information, enrollment status, and various tracking attributes.


Columns

Column NameData TypeConstraintsDescription
mappedIdint(11)Primary Key, Not NullUnique identifier for the child, mapped to the idmapper table.
birthdatedatetimeNullableDate and time of the child’s birth.
createdDatedatetimeNullableThe date and time when the record was created.
dateEnrolleddatetimeNullableDate when the child was enrolled in the program/system.
dateOfCompletiondatetimeNullableDate when the child's enrollment was completed.
descriptionvarchar(255)NullableAdditional description about the child.
domicilevarchar(30)NullableChild’s domicile (permanent residence).
medicalRecordNumbervarchar(30)NullableIdentifier for the child’s medical record.
estimatedBirthdatetinyint(1)NullableIndicates if the birthdate is estimated (1 for true, 0 for false).
fatherFirstNamevarchar(35)NullableFather’s first name.
fatherLastNamevarchar(30)NullableFather’s last name.
fatherMiddleNamevarchar(30)NullableFather’s middle name.
firstNamevarchar(30)NullableChild’s first name.
gendervarchar(15)Default: 'UNKNOWN'Gender of the child (e.g., Male, Female, Unknown).
lastEditedDatedatetimeNullableTimestamp for the last edit made to the child’s record.
lastNamevarchar(30)NullableChild’s last name.
middleNamevarchar(30)NullableChild’s middle name.
motherFirstNamevarchar(30)NullableMother’s first name.
motherLastNamevarchar(30)NullableMother’s last name.
motherMiddleNamevarchar(30)NullableMother’s middle name.
nicvarchar(20)NullableNational Identification Card (NIC) number of the child (if applicable).
nicOwnerFirstNamevarchar(30)NullableFirst name of the person owning the NIC linked to the child.
nicOwnerLastNamevarchar(30)NullableLast name of the person owning the NIC linked to the child.
nicOwnerRelationsmallint(6)NullableRelationship of the NIC owner to the child (e.g., parent, guardian).
statusvarchar(20)Default: 'FOLLOW_UP'Current status of the child (e.g., Enrolled, Completed, Follow-Up).
terminationDatedatetimeNullableDate when the child’s enrollment was terminated.
terminationReasonvarchar(255)NullableReason for termination of enrollment.
terminationReasonOthervarchar(255)NullableAdditional details about the termination reason, if applicable.
createdByUserIdint(11)NullableUser ID of the person who created the record, references the user table.
lastEditedByUserIdint(11)NullableUser ID of the person who last edited the record, references the user table.
enrollmentVaccineIdsmallint(6)NullableID of the vaccine associated with the child’s enrollment, references the vaccine table.
armIdint(11)NullableID of the associated arm (study or program), references the arm table.
zeroDosetinyint(1)NullableIndicates if the child received a zero-dose vaccine (1 for true, 0 for false).
isExternalFollowedupChildtinyint(1)NullableIndicates if the child is followed up externally (1 for true, 0 for false).

---

Indexes

  1. Primary Key: mappedId
    • Ensures uniqueness for each child record.
  2. Foreign Keys:
    • mappedId → idmapper(mappedId)
    • createdByUserId → user(mappedId)
    • lastEditedByUserId → user(mappedId)
    • enrollmentVaccineId → vaccine(vaccineId)
    • armId → arm(armId)
  3. Indexes:
    • child_lastEditedByUserId_user_mappedId_FK
    • child_createdByUserId_user_mappedId_FK
    • child_enrVaccId_vaccine_vaccId_idx
    • child_birthdate
    • arm_armId_child_armId_FK_idx
    • child_createdDate
    • idx_child_dateEnrolled_zeroDose (Used for ZeroDoseReport stored procedure).
    • idx_child_dateEnrolled
    • idx_child_fatherFirstName (Optimized for search queries).
    • idx_child_fatherFirstName_firstName

Relationships

  1. idmapper table:
    • Maps mappedId for unique identification across systems.
  2. user table:
    • Tracks who created or edited child records.
  3. vaccine table:
    • Links children to specific vaccines received during enrollment.
  4. arm table:
    • Associates children with program/study arms.

Usage Notes

  • The child table is central to tracking a child’s enrollment, vaccination, and follow-up processes.
  • Indexes and constraints are optimized for query performance and referential integrity.
  • Nullable fields allow flexibility in recording incomplete data while maintaining essential fields like mappedId and status.